<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>管理系统</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
	name="viewport">
<!-- Bootstrap 3.3.7 -->
<link rel="stylesheet"
	th:href="@{/bower_components/bootstrap/dist/css/bootstrap.min.css}">
<!-- Font Awesome -->
<link rel="stylesheet"
	th:href="@{/bower_components/font-awesome/css/font-awesome.min.css}"
	href="bower_components/font-awesome/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet"
	th:href="@{/bower_components/Ionicons/css/ionicons.min.css}"
	href="bower_components/Ionicons/css/ionicons.min.css">
<!-- DataTables -->
<link rel="stylesheet"
	th:href="@{/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css}"
	href="bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
<!-- Theme style -->
<link rel="stylesheet" th:href="@{/dist/css/AdminLTE.min.css}"
	href="dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" th:href="@{/dist/css/skins/_all-skins.min.css}"
	href="dist/css/skins/_all-skins.min.css">
<!-- Google Font -->
<link rel="stylesheet"
	href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
<style type="text/css">
a {
	color: #333
}
</style>
</head>
<body class="hold-transition skin-blue sidebar-mini">
	<div class="wrapper">
		<div th:replace="~{admin/templates/header::.main-header}"></div>
		<aside class="main-sidebar"
			th:include="~{admin/templates/aside::.main-sidebar}"
			th:with="onevar='party'"></aside>
		<!-- Content Wrapper. Contains page content -->
		<div class="content-wrapper">
			<!-- Content Header (Page header) -->
			<section class="content-header">
				<h1>党群建设</h1>
				<ol class="breadcrumb">
					<li><a th:href="@{/admin}"><i class="fa fa-dashboard"></i> 首页</a></li>
					<li class="active">党群建设</li>
				</ol>
			</section>
			<!-- Main content -->
			<section class="content">
				<div class="row">
					<div class="col-xs-12">
						<div class="box">
							<div class="box-header">
								<h3 class="box-title">文章列表</h3>
								<div class="box-tools">
									<a type="button" class="btn btn-primary btn-sm"
										th:href="@{/admin/addparty}" href="/admin/addparty">新增</a>
								</div>
							</div>
							<!-- /.box-header -->
							<div class="box-body">
								<div id="example2_wrapper"
									class="dataTables_wrapper form-inline dt-bootstrap">
									<div class="row">
										<div class="col-sm-12">
											<table id="example2"
												class="table table-bordered table-hover dataTable"
												role="grid" aria-describedby="example2_info">
												<thead>
													<tr role="row">
														<th tabindex="0" aria-controls="example2" rowspan="1"
															colspan="1" aria-sort="ascending">序号</th>
														<th tabindex="0" aria-controls="example2" rowspan="1"
															colspan="1">标题</th>
														<th tabindex="0" aria-controls="example2" rowspan="1"
															colspan="1">创建时间</th>
														<th tabindex="0" aria-controls="example2" rowspan="1"
															colspan="1">操作</th>
													</tr>
												</thead>
												<tbody>
													<tr role="row" class="odd" th:each="item:${partys}">
														<td th:text="${itemStat.index+1}">1</td>
														<td><a th:text="${item.title}"
															th:href="@{'/admin/updateparty/'+${item.id}}">担负新使命
																聚焦新任务 把握新要求</a></td>
														<td
															th:text="${#dates.format(item.createTime, 'yyyy-MM-dd')}">2018-03-21</td>
														<td>
															<!--<button type="button" class="btn btn-warning">编辑</button>
															<button type="button" class="btn btn-success">保存</button> -->
															<a type="button" class="btn btn-danger"
															th:href="@{'/admin/delParty/'+${item.id}}">删除</a>
														</td>
													</tr>
												</tbody>
											</table>
										</div>
									</div>
									<div class="row">
										<div class="col-sm-12">
											<div class="dataTables_paginate paging_simple_numbers"
												id="example2_paginate" style="text-align: right;">
												<ul class="pagination">
													<li class="paginate_button previous" id="example2_previous"><a
														th:href="@{'/admin/party?pageNum='+${pageInfo.prePage}}"
														aria-controls="example2" data-dt-idx="0" tabindex="0">上一页</a></li>
													<li class="paginate_button"
														th:classappend="${iStat.index}==0?'active'"
														th:each="i:${#numbers.sequence(pageInfo.pageNum, (pageInfo.pages-pageInfo.pageNum)>6?(pageInfo.pageNum+6):pageInfo.pages)}"><a
														th:text="${i}"
														th:href="@{'/admin/party?pageNum='+${i}}"
														aria-controls="example2" data-dt-idx="1" tabindex="0">1</a></li>
													<li class="paginate_button next" id="example2_next"><a
														th:href="@{'/admin/party?pageNum='+${pageInfo.nextPage}}"
														aria-controls="example2" data-dt-idx="7" tabindex="0">下一页</a></li>
												</ul>
											</div>
										</div>
									</div>
								</div>
							</div>
							<!-- /.box-body -->
						</div>
						<!-- /.box -->
					</div>
				</div>
			</section>
		</div>
	</div>
	<!-- jQuery 3 -->
	<script th:src="@{/bower_components/jquery/dist/jquery.min.js}"
		src="bower_components/jquery/dist/jquery.min.js"></script>
	<!-- Bootstrap 3.3.7 -->
	<script
		th:src="@{/bower_components/bootstrap/dist/js/bootstrap.min.js}"
		src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
	<!-- DataTables -->
	<script
		th:src="@{/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js}"
		src="bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
	<!-- SlimScroll -->
	<script
		th:src="@{/bower_components/jquery-slimscroll/jquery.slimscroll.min.js}"
		src="bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
	<!-- FastClick -->
	<script th:src="@{/bower_components/fastclick/lib/fastclick.js}"
		src="bower_components/fastclick/lib/fastclick.js"></script>
	<!-- AdminLTE App -->
	<script th:src="@{/dist/js/adminlte.min.js}"
		src="dist/js/adminlte.min.js"></script>
	<!-- AdminLTE for demo purposes -->
	<script th:src="@{/dist/js/demo.js}" src="dist/js/demo.js"></script>
	<!-- page script -->
	<script>
		$(function() {
			$('#example1').DataTable()
			$('#example2').DataTable({
				'paging' : true,
				'lengthChange' : false,
				'searching' : false,
				'ordering' : true,
				'info' : true,
				'autoWidth' : false
			})
		})
	</script>
</body>
</html>